<!doctype html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>Post Processing Bloom Effect</title>
    <meta name="description" content="Post Processing Bloom Effect • A-Frame" />
    <script type="importmap">
      {
        "imports": {
          "aframe": "../../../dist/aframe-master.module.min.js",
          "three": "../../../super-three-package/build/three.module.js",
          "three/addons/": "../../../super-three-package/examples/jsm/"
        }
      }
    </script>
    <script type="module">
      import AFRAME from 'aframe';
    </script>
    <script src="../../js/info-message.js" type="module"></script>
    <script src="./effect-controls.js" type="module"></script>
    <script src="./bloom.js" type="module"></script>
  </head>

  <body>
    <a-scene
      bloom="threshold: 1.0; strength: 0.3; radius: 1;"
      background="color: #000000"
      renderer="toneMapping: ACESFilmic;"
      info-message="htmlSrc: #messageText"
    >
      <a-assets>
        <!-- model by arturs.vitas https://skfb.ly/owUr9 -->
        <a-asset-item id="testbed" src="https://cdn.aframe.io/examples/post-processing/fancy-car.glb"></a-asset-item>
        <a-asset-item id="messageText" src="message.html"></a-asset-item>
      </a-assets>

      <a-entity id="rig" position="0 0 2">
        <a-entity id="camera" position="0 1.6 0" camera look-controls wasd-controls></a-entity>

        <a-entity id="lhand" effect-controls="hand: left;"> </a-entity>

        <a-entity id="rhand" effect-controls="hand: right;"> </a-entity>
      </a-entity>

      <a-entity
        id="base"
        geometry="primitive: cylinder; height: 0.1; radius: 1.93"
        position="0 0 -2"
        material="color: #201d1d"
        shadow
        animation="property: rotation; to: 0 360 0 ; loop: true; dur: 15000; easing: linear;"
      >
        <a-entity id="tooncar" gltf-model="#testbed" position="0 0.050 0" scale="2 2 2" shadow> </a-entity>

        <a-entity
          id="neon01"
          geometry="primitive: torus; radius: 1.92; radiusTubular: 0.02; segmentsRadial: 50; segmentsTubular: 40"
          material="color: #d100e0; emissive: #b300a4; emissiveIntensity: 9.34"
          rotation="90 0 0"
        >
        </a-entity>
      </a-entity>

      <a-entity id="ambient" light="type: ambient; intensity: 0.48; color: #ffffff"> </a-entity>

      <a-entity id="point01" light="color: #7cd2fe; intensity: 5; type: point;" position="0 3.51 -1"> </a-entity>
    </a-scene>
  </body>
</html>
